home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / QuickDraw GX / QuickDraw GX Info / QuickDraw GX Interfaces / Interfaces & Libraries / interfaces / layout edit library.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-30  |  4.5 KB  |  170 lines  |  [TEXT/MPS ]

  1. /* graphics libraries:
  2.   layout edit library interfaces: a Simple layout editing based on the TextEdit model.
  3.   by Dave Opstad, Eric Mader
  4.   Copyright 1992 - 1993 Apple Computer, Inc. All rights reserved.    */
  5.  
  6. #pragma once
  7. #ifndef layoutEditLibraryIncludes
  8.     #define layoutEditLibraryIncludes
  9.     
  10.     #include <Types.h>
  11.     #include <Memory.h>
  12.     
  13.     #ifndef selectionLibraryIncludes
  14.     #include "selection library.h"
  15.     #endif
  16.     
  17.     #ifndef layoutTypesIncludes
  18.     #include "layout types.h"
  19.     #endif
  20.     
  21.     #ifdef __cplusplus
  22.     extern "C" {
  23.     #endif
  24.     
  25.     typedef Handle LayoutEditHandle;
  26.     
  27.     LayoutEditHandle NewLayoutEditHandle(
  28.       long textRunCount,
  29.       const short textRunLengths[],
  30.       const void *text[],
  31.       long styleRunCount,
  32.       const short styleRunLengths[],
  33.       const gxStyle styles[],
  34.       long levelRunCount,
  35.       const short levelRunLengths[],
  36.       const short levels[],
  37.       gxLayoutOptions *layoutOptions,
  38.       gxPoint *position,
  39.       gxStyle defaultStyle);
  40.     
  41.     LayoutEditHandle LayoutEditHandleFromLayout(gxShape layout);
  42.     
  43.     long GetLayoutEditHandle(
  44.       LayoutEditHandle handle,
  45.       void *text,
  46.       long *styleRunCount,
  47.       short styleRunLengths[],
  48.       gxStyle styles[],
  49.       long *levelRunCount,
  50.       short levelRunLengths[],
  51.       short levels[],
  52.       gxLayoutOptions *layoutOptions,
  53.       gxPoint *position);
  54.     
  55.     void SetLayoutEditHandle(
  56.       LayoutEditHandle handle,
  57.       long textRunCount,
  58.       const short textRunLengths[],
  59.       const void *text[],
  60.       long styleRunCount,
  61.       const short styleRunLengths[],
  62.       const gxStyle styles[],
  63.       long levelRunCount,
  64.       const short levelRunLengths[],
  65.       const short levels[],
  66.       const gxLayoutOptions *layoutOptions,
  67.       const gxPoint *position);
  68.     
  69.     void SetLayoutEditHandleParts(
  70.       LayoutEditHandle handle,
  71.       gxByteOffset oldStartOffset,
  72.       gxByteOffset oldEndOffset,
  73.       long newTextRunCount,
  74.       const short newTextRunLengths[],
  75.       const void *newText[],
  76.       long newStyleRunCount,
  77.       const short newStyleRunLengths[],
  78.       const gxStyle newStyles[],
  79.       long newLevelRunCount,
  80.       const short newLevelRunLengths[],
  81.       const short newLevels[]);
  82.     
  83.     void SetLayoutEditHandleSelectedParts(
  84.       LayoutEditHandle handle,
  85.       long newTextRunCount,
  86.       const short newTextRunLengths[],
  87.       const void *newText[],
  88.       long newStyleRunCount,
  89.       const short newStyleRunLengths[],
  90.       const gxStyle newStyles[],
  91.       long newLevelRunCount,
  92.       const short newLevelRunLengths[],
  93.       const short newLevels[]);
  94.     
  95.     void SetLayoutEditHandleShapeParts(
  96.       LayoutEditHandle handle,
  97.       gxByteOffset startOffset,
  98.       gxByteOffset endOffset,
  99.       gxShape insert);
  100.     
  101.     long GetLayoutEditHandleParts(
  102.       LayoutEditHandle handle,
  103.       gxByteOffset startOffset,
  104.       gxByteOffset endOffset,
  105.       void *text,
  106.       long *styleRunCount,
  107.       short styleRunLengths[],
  108.       gxStyle styles[],
  109.       long *levelRunCount,
  110.       short levelRunLengths[],
  111.       short levels[]);
  112.     
  113.     long GetLayoutEditHandleSelectedParts(
  114.       LayoutEditHandle handle,
  115.       void *text,
  116.       long *styleRunCount,
  117.       short styleRunLengths[],
  118.       gxStyle styles[],
  119.       long *levelRunCount,
  120.       short levelRunLengths[],
  121.       short levels[]);
  122.     
  123.     gxShape GetLayoutEditHandleShapeParts(
  124.       LayoutEditHandle handle,
  125.       gxByteOffset startOffset,
  126.       gxByteOffset endOffset,
  127.       gxShape dest);
  128.  
  129.     void LayoutEditRotateShape(LayoutEditHandle handle, fixed degrees, fixed translateX, fixed translateY);
  130.         
  131.     void LayoutEditIdle(LayoutEditHandle handle);
  132.     
  133.     void LayoutEditClick(LayoutEditHandle handle, gxPoint hitDown);
  134.     
  135.     void LayoutEditActivate(LayoutEditHandle handle);
  136.     
  137.     void LayoutEditDeactivate(LayoutEditHandle handle);
  138.     
  139.     void LayoutEditKey(LayoutEditHandle handle, char key);
  140.     
  141.     void LayoutEditUpdate(LayoutEditHandle handle);
  142.     
  143.     SelectionHandle LayoutEditGetSelection(LayoutEditHandle handle);
  144.     
  145.     void LayoutEditSetSelection(LayoutEditHandle handle, SelectionOffset start, SelectionOffset end);
  146.     
  147.     void LayoutEditSetSelectionHandle(LayoutEditHandle handle, SelectionHandle selection);
  148.     
  149.     gxViewPort GetLayoutEditViewPort(LayoutEditHandle handle);
  150.  
  151.     void LayoutEditSetStyle(LayoutEditHandle handle, gxStyle newStyle);
  152.     void LayoutEditIncrementLevel(LayoutEditHandle handle);
  153.     void LayoutEditDecrementLevel(LayoutEditHandle handle);
  154.     void LayoutEditSetLevel(LayoutEditHandle handle, long level);
  155.     
  156.     void LayoutEditCut(LayoutEditHandle handle);
  157.     void LayoutEditCopy(LayoutEditHandle handle);
  158.     void LayoutEditPaste(LayoutEditHandle handle);
  159.     void LayoutEditClear(LayoutEditHandle handle);
  160.     
  161.     void LayoutEditFromScrap(LayoutEditHandle handle);
  162.     void LayoutEditToScrap(LayoutEditHandle handle);
  163.     
  164.     void DisposeLayoutEditHandle(LayoutEditHandle handle);
  165.     
  166.     #ifdef __cplusplus
  167.     }
  168.     #endif
  169. #endif
  170.